package structure_pattern.observer_pattern;

/**
 * @author Feili
 * @since 2022/6/9 17:36
 */
public class Test {
    public static void main(String[] args) {
        StockNoticeControlCenter stockNoticeControlCenter = new StockNoticeControlCenter(new Stock(6));
        User user1 = new User("张三");
        User user2 = new User("李四");
        User user3 = new User("王五");
        User user4 = new User("赵六");
        stockNoticeControlCenter.add(user1);
        stockNoticeControlCenter.add(user2);
        stockNoticeControlCenter.add(user3);
        stockNoticeControlCenter.add(user4);

        stockNoticeControlCenter.notifyUser();
    }
}